package demo;

import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JFrame;

public class FlowLayoutDemo {
	public static void main(String[] args) {
		JFrame frame = new JFrame("Welcome To MLDN") ; 
		frame.setLayout(new FlowLayout(FlowLayout.CENTER,3,3));
		JButton jbutton = null;
		for (int i = 0; i < 9; i++) {
			jbutton = new JButton("按钮"+i); 
			frame.add(jbutton);
		}
		frame.setSize(280,123) ;				// 设置窗体大小
		frame.setVisible(true) ;
	}
}
